/*
- Malt Project - typeobject.hpp
- This document is protected by the GPL protocol.
- Writer:@Index-Flandre
*/

#ifndef MALT_TYPEOBJECT_H
#define MALT_TYPEOBJECT_H

#include <cstdio>

namespace malt {
	#define MaltObjectHead	\
		TypeObject* tp;				\
		bool gc_mark;					\
		unsigned long thread_clock_id;

	#define TypeHead	\
		0,							\
		&TypeType,

	#define Nullptr ((void*)0)
	#define MaltNullptr ((Object*)0)

	struct TypeObject {
		MaltObjectHead
		const char *name;
		
		virtual bool eq(void* obj);
		virtual void repl_print();
		virtual void marking();
	};
	extern TypeObject
	TypeType,
	BoolType,
	NumberType,
	StringType, SymbolType,
	ArrayType, ListType;

	void TypeInit();
};

#endif